// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   RegistrationValidator.java

package com.nervytech.tutorcruise.spring.form.validator;

import org.springframework.stereotype.Component;
import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils;

import com.nervytech.tutorcruise.spring.common.form.RegistrationForm;

@Component("registrationValidator")
public class RegistrationValidator
{

    public void validate(Object target, Errors errors)
    {
        RegistrationForm registrationForm = (RegistrationForm)target;
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "fullName", "NotEmpty.registrationForm.fullName", "Full name must be provided");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "emailId", "NotEmpty.registrationForm.emailId", "EmailId must be provided");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "password", "NotEmpty.registrationForm.password", "Password must be provided");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "zipCode", "NotEmpty.registrationForm.zipCode", "Zip Code must be provided");
    }
}
